function upload(){
    if(document.getElementById("file").value == null || document.getElementById("file").value == ""){
        alert("请选择上传文件");
    }else {
        document.getElementById('myForm').action = "../upload";
        document.getElementById("myForm").submit();
    }
}
function  editor1() {
    var workname;
    workname =  $(".photo").find("img").attr('src');
    var goodsname = workname.substring(0,workname.length - 5);
    $.ajax({
        url: "http://localhost:8080/Page",
        type: "POST",
        dataType: "text",
        traditional: true,
        data: {
            "ids": goodsname
        }
    });
}
function  editor2() {
    var workname;
    workname =  $(".photo1").find("img").attr('src');
    var goodsname = workname.substring(0,workname.length - 5);
    $.ajax({
        url: "http://localhost:8080/Page",
        type: "POST",
        dataType: "text",
        traditional: true,
        data: {
            "ids": goodsname
        }
    });
}
function  editor3() {
    var workname;
    workname =  $(".photo2").find("img").attr('src');
    var goodsname = workname.substring(0,workname.length - 5);
    $.ajax({
        url: "http://localhost:8080/Page",
        type: "POST",
        dataType: "text",
        traditional: true,
        data: {
            "ids": goodsname
        }
    });
}
function  editor4() {
    var workname;
    workname =  $(".photo3").find("img").attr('src');
    var goodsname = workname.substring(0,workname.length - 5);
    $.ajax({
        url: "http://localhost:8080/Page",
        type: "POST",
        dataType: "text",
        traditional: true,
        data: {
            "ids": goodsname
        }
    });
}
function  editor5() {
    var workname;
    workname =  $(".photo4").find("img").attr('src');
    var goodsname = workname.substring(0,workname.length - 5);
    $.ajax({
        url: "http://localhost:8080/Page",
        type: "POST",
        dataType: "text",
        traditional: true,
        data: {
            "ids": goodsname
        }
    });
}
function  editor6() {
    var workname;
    workname =  $(".photo5").find("img").attr('src');
    var goodsname = workname.substring(0,workname.length - 5);
    $.ajax({
        url: "http://localhost:8080/Page",
        type: "POST",
        dataType: "text",
        traditional: true,
        data: {
            "ids": goodsname
        }
    });
}
function  editor7() {
    var workname;
    workname =  $(".photo6").find("img").attr('src');
    var goodsname = workname.substring(0,workname.length - 5);
    $.ajax({
        url: "http://localhost:8080/Page",
        type: "POST",
        dataType: "text",
        traditional: true,
        data: {
            "ids": goodsname
        }
    });
}
function  editor8() {
    var workname;
    workname =  $(".photo7").find("img").attr('src');
    var goodsname = workname.substring(0,workname.length - 5);
    $.ajax({
        url: "http://localhost:8080/Page",
        type: "POST",
        dataType: "text",
        traditional: true,
        data: {
            "ids": goodsname
        }
    });
}







function onclickone() {
    var workname;
    workname =  $(".photo").find("img").attr('src');
    var goodsname = workname.substring(0,workname.length - 5);
    $.ajax({
        url: "http://localhost:8080/Page",
        type: "POST",
        dataType: "text",
        traditional: true,
        data: {
            "ids": goodsname
        }
    });
    location.href = "http://localhost:8080/edit";
}
function onclicktwo() {
    var workname;
    workname =  $(".photo1").find("img").attr('src');
    var goodsname = workname.substring(0,workname.length - 5);
    $.ajax({
        url: "http://localhost:8080/Page",
        type: "POST",
        dataType: "text",
        traditional: true,
        data: {
            "ids": goodsname
        }
    });
    location.href = "http://localhost:8080/edit";
}
function onclickthree() {
    var workname;
    workname =  $(".photo2").find("img").attr('src');
    var goodsname = workname.substring(0,workname.length - 5);
    $.ajax({
        url: "http://localhost:8080/Page",
        type: "POST",
        dataType: "text",
        traditional: true,
        data: {
            "ids": goodsname
        }
    });
    location.href = "http://localhost:8080/edit";
}
function onclickfour() {
    var workname;
    workname =  $(".photo3").find("img").attr('src');
    var goodsname = workname.substring(0,workname.length - 5);
    $.ajax({
        url: "http://localhost:8080/Page",
        type: "POST",
        dataType: "text",
        traditional: true,
        data: {
            "ids": goodsname
        }
    });
    location.href = "http://localhost:8080/edit";
}
function onclickfive() {
    var workname;
    workname =  $(".photo4").find("img").attr('src');
    var goodsname = workname.substring(0,workname.length - 5);
    $.ajax({
        url: "http://localhost:8080/Page",
        type: "POST",
        dataType: "text",
        traditional: true,
        data: {
            "ids": goodsname
        }
    });
    location.href = "http://localhost:8080/edit";
}
function onclicksix() {
    var workname;
    workname =  $(".photo5").find("img").attr('src');
    var goodsname = workname.substring(0,workname.length - 5);
    $.ajax({
        url: "http://localhost:8080/Page",
        type: "POST",
        dataType: "text",
        traditional: true,
        data: {
            "ids": goodsname
        }
    });
    location.href = "http://localhost:8080/edit";
}
function onclickseven() {
    var workname;
    workname =  $(".photo6").find("img").attr('src');
    var goodsname = workname.substring(0,workname.length - 5);
    $.ajax({
        url: "http://localhost:8080/Page",
        type: "POST",
        dataType: "text",
        traditional: true,
        data: {
            "ids": goodsname
        }
    });
    location.href = "http://localhost:8080/edit";
}
function onclickeight() {
    var workname;
    workname =  $(".photo7").find("img").attr('src');
    var goodsname = workname.substring(0,workname.length - 5);
    $.ajax({
        url: "http://localhost:8080/Page",
        type: "POST",
        dataType: "text",
        traditional: true,
        data: {
            "ids": goodsname
        }
    });
    location.href = "http://localhost:8080/edit";
}

